package com.example.houtai.mapper;

import com.example.houtai.entity.SysUserRole;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.org.dto.SysUserRoleDto;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 用户与角色对应关系 Mapper 接口
 * </p>
 *
 * @author 龚梦
 * @since 2021-03-22
 */
public interface SysUserRoleMapper extends BaseMapper<SysUserRole> {

    @Delete("delete from sys_user_role where user_id=#{userId}")
    void deletebyuserid(@Param("userId") Long userId);

    List<SysUserRoleDto> listbyuserid(@Param("uid") Long userId);
}
